package com.pattern.structure.decorator;

/**
 * @author yangguanzan
 * @date 4/3/22
 * @description
 */
public class ConcreteDecorator extends BaseDecorator {

    public ConcreteDecorator(BaseComponent component) {
        super(component);
    }

    @Override
    public  void operation() {
        preOperation();
        super.operation();
        afterOperation();
    }

    public void preOperation() {
        System.out.println("提前装饰，做铺垫");
    }
    public void afterOperation() {
        System.out.println("之后装饰，事后补救");
    }

}
